package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IEquiRegisterDao;
import com.jemmyee.pizza.entity.EquiRegister;

@Repository("equiRegisterService")
public class EquiRegisterServiceImpl implements IEquiRegisterService<EquiRegister>{

	private static final Log log = LogFactory.getLog(EquiRegisterServiceImpl.class);
	
	@Autowired
	private IEquiRegisterDao equiRegisterDao ;
	
	public void delete(EquiRegister entity) {
		equiRegisterDao.delete(entity);
	}

	public void deleteAll(List<EquiRegister> list) {
		equiRegisterDao.deleteAll(list);
	}

	public void deleteById(Serializable id) {
		equiRegisterDao.deleteById(id);
	}

	public List<EquiRegister> findAll() {
		return equiRegisterDao.findAll(new EquiRegister());
	}

	public List<EquiRegister> findByCriteria(DetachedCriteria criteria) {
		return equiRegisterDao.findByCriteria(criteria);
	}

	public EquiRegister findById(Serializable id) {
		return equiRegisterDao.findById(id);
	}

	public List<EquiRegister> findByProperty(String propertyName, Object value) {
		return equiRegisterDao.findByProperty(new EquiRegister(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return equiRegisterDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(EquiRegister entity) {
		equiRegisterDao.save(entity);
	}

	public void update(EquiRegister entity) {
		equiRegisterDao.update(entity);
	}

}
